<a href="https://github.com/socketstream/socketstream/edit/master/lib/utils/log.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L11" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">log</code>
<div><span class="hint">service in module <code ng:non-bindable="">ss</code>
</span>
</div>
</h1>
<div><h2 id="description">Description</h2>
<div class="description"><div class="ss-log-page ss-log-log-page"><p>Contains method stubs for logging to console (by default) or
whatever logging provider you choose.</p>
</div></div>
<div class="member method"><h2 id="methods">Methods</h2>
<ul class="methods"><li><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L52" class="view-source icon-eye-open"> </a><h3 id="methods_debug">debug()</h3>
<div class="debug"><div class="ss-log-debug-page"><p>Debug level logging, uses console.log by default. Override by assigning a
function that takes the same parameters as console.log:</p>
<pre><code>var ss = require(&#39;socketstream&#39;);
ss.api.log.debug = console.log;
</code></pre></div><h4 id="methods_debug_example">Example</h4>
<div class="example"><div class="ss-log-debug-page"><pre><code>ss.log.debug(&quot;Something fairly trivial happened&quot;);
</code></pre></div></div>
</div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L109" class="view-source icon-eye-open"> </a><h3 id="methods_error">error()</h3>
<div class="error"><div class="ss-log-error-page"><p>Error level logging, uses console.error by default. Override by assigning a
function that takes the same parameters as console.error.</p>
</div><h4 id="methods_error_example">Example</h4>
<div class="example"><div class="ss-log-error-page"><pre><code>ss.log.error(&quot;Time to wakeup the sysadmin&quot;);
</code></pre></div></div>
</div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L69" class="view-source icon-eye-open"> </a><h3 id="methods_info">info()</h3>
<div class="info"><div class="ss-log-info-page"><p>Info level logging, uses console.log by default. Override by assigning a
function that takes the same parameters as console.log.</p>
</div><h4 id="methods_info_example">Example</h4>
<div class="example"><div class="ss-log-info-page"><pre><code>ss.log.info(&quot;Just keeping you informed&quot;);
</code></pre></div></div>
</div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L30" class="view-source icon-eye-open"> </a><h3 id="methods_trace">trace()</h3>
<div class="trace"><div class="ss-log-trace-page"><p>Trace function calls in socketstream and plugins. By default nothing is done.
If you want to switch on tracing override the <code>trace</code> method.</p>
<pre><code>var ss = require(&#39;socketstream&#39;);
ss.api.log.trace = function() {
console.log.apply(console,arguments);
};
</code></pre></div></div>
</li>
<li><a href="https://github.com/socketstream/socketstream/blob/796fa06/lib/utils/log.js#L91" class="view-source icon-eye-open"> </a><h3 id="methods_warn">warn()</h3>
<div class="warn"><div class="ss-log-warn-page"><p>Warn level logging, uses console.log by default. Override by assigning a
function that takes the same parameters as console.log:</p>
<pre><code>var ss = require(&#39;socketstream&#39;),
    winston = require(&#39;winston&#39;);
ss.log.warn = winston.warn;
</code></pre></div><h4 id="methods_warn_example">Example</h4>
<div class="example"><div class="ss-log-warn-page"><pre><code>ss.log.warn(&quot;Something unexpected happened!&quot;);
</code></pre></div></div>
</div>
</li>
</ul>
</div>
</div>
